package com.zhku.openservice;

import com.zhku.entity.Vaccinum;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @BelongsProject: SpringBoot_School_Work
 * @BelongsPackage: com.zhku.openservice
 * @Author: "deweyMDH"
 * @CreateTime: 2023-04-12  22:52
 * @Version: 1.0
 */
//以接口的形式，来进行服务调度，这个其实更好，因为很容易分离开各个服务
@FeignClient(value = "vecisystem-vacci")    // 要调度的服务名称,这个接口就可以同意调度，这个服务的方法
public interface VacciOpenService {

    @GetMapping(value = "vaccinum/getOne/{id}")
    public Vaccinum getOne(@PathVariable(value = "id") Long id);

    @GetMapping(value = "vaccinum/getAll")
    public List<Vaccinum> getAll();
}
